/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.psi.action.supplychainmana;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.psi.mapper.supplychainmana.SupplierContactsMapper;
public class SupplierContacts extends BaseAction
{
    @Autowired(required=false)
	private SupplierContactsMapper mapper;
    /**
    联系人
    */
    
    public Map supplierContacts() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> per=mapper.per(params,pagination);
        per.setPagedListInfo(pagination);
        result.put("per", per);
        
        return result;
    }
    /**
    联系人明细
    */
    
    public Map contactsDetailed() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> station_info=mapper.station_info(params);
        result.put("station_info", station_info);
        
        
        SQLList<SQLMap> person_info=mapper.person_info(params);
        SQLMap person_info_emt=person_info.getExistfirst();
        result.put("person_info", person_info_emt);
        
        
        SQLList<SQLMap> phone_info=mapper.phone_info(params);
        result.put("phone_info", phone_info);
        
        
        SQLList<SQLMap> email_info=mapper.email_info(params);
        result.put("email_info", email_info);
        
        
        SQLList<SQLMap> moment_info=mapper.moment_info(params);
        result.put("moment_info", moment_info);
        
        
        SQLList<SQLMap> text_info=mapper.text_info(params);
        result.put("text_info", text_info);
        
        
        SQLList<SQLMap> address_info=mapper.address_info(params);
        SQLMap address_info_emt=address_info.getExistfirst();
        result.put("address_info", address_info_emt);
        
        return result;
    }
    /**
    增加电话
    */
    
    public Map contactsPhonesAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> phone=mapper.phone(params);
        result.put("phone", phone);
        
        
        SQLList<SQLMap> phonetype=mapper.phonetype(params);
        result.put("phonetype", phonetype);
        
        return result;
    }
    /**
    增加电子邮件
    */
    
    public Map contactsEmailsAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> emailtype=mapper.emailtype(params);
        result.put("emailtype", emailtype);
        
        
        SQLList<SQLMap> mails=mapper.mails(params);
        result.put("mails", mails);
        
        return result;
    }
    /**
    增加即时通讯地址
    */
    
    public Map contactsImmediate() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> momentcon=mapper.momentcon(params);
        result.put("momentcon", momentcon);
        
        
        SQLList<SQLMap> momentconano=mapper.momentconano(params);
        result.put("momentconano", momentconano);
        
        
        SQLList<SQLMap> ims=mapper.ims(params);
        result.put("ims", ims);
        
        return result;
    }
    /**
    增加文本消息地址
    */
    
    public Map contactsTextMes() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> text=mapper.text(params);
        result.put("text", text);
        
        
        SQLList<SQLMap> textmsgs=mapper.textmsgs(params);
        result.put("textmsgs", textmsgs);
        
        return result;
    }
    /**
    */
    
    public Map d_person() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_person(params);
        
        return result;
    }
    /**
    */
    
    public Map u_ta() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.u_ta(params);
        
        return result;
    }
    /**
    */
    
    public Map u_mc() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.u_mc(params);
        
        return result;
    }
    /**
    */
    
    public Map u_email() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.u_email(params);
        
        return result;
    }
    /**
    */
    
    public Map u_phones() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.u_phones(params);
        
        return result;
    }
    /**
    */
    
    public Map d_text() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_text(params);
        
        return result;
    }
    /**
    */
    
    public Map d_moment() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_moment(params);
        
        return result;
    }
    /**
    */
    
    public Map d_email() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_email(params);
        
        return result;
    }
    /**
    */
    
    public Map d_phone() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_phone(params);
        
        return result;
    }
    /**
    增加电话修改
    */
    
    public Map contactsPhonesAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        for (SQLMap emt:hqlBean.getTableElements("phones")){
            params=new SQLParam(request,emt.getMap());
            mapper.pid(params);
        }
        
        return result;
    }
    /**
    增加电子邮件修改
    */
    
    public Map contactsEmailsAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        for (SQLMap emt:hqlBean.getTableElements("email")){
            params=new SQLParam(request,emt.getMap());
            mapper.contactsEmailsAddSubmit(params);
        }
        
        return result;
    }
    /**
    增加即时通讯地址修改
    */
    
    public Map contactsImmediateSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        for (SQLMap emt:hqlBean.getTableElements("moment_contact")){
            params=new SQLParam(request,emt.getMap());
            mapper.contactsImmediateSubmit(params);
        }
        
        return result;
    }
    /**
    增加文本消息地址修改
    */
    
    public Map contactsTextMesSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        for (SQLMap emt:hqlBean.getTableElements("text_address")){
            params=new SQLParam(request,emt.getMap());
            mapper.contactsTextMesSubmit(params);
        }
        
        return result;
    }
}